{template 'header'}
<link rel="stylesheet" type="text/css" href="image/css_20140614.css"/>
<script type="text/javascript" src="image/register_new.js"></script>
<style type="text/css">
.tl
{
    width:150px;
    text-align:right;
    padding-right:20px;
}
.reg_title 
{
    border-bottom:#CCCCCC 1px solid;
    font-weight:bold;
    padding:0 0 10px 10px;
    margin:15px 55px 0 55px;
    font-size:14px;
    color:#FF6600;
}
.reg_inp 
{
    border:#7F9DB9 1px solid;
    padding:3px 0 3px 0;
}
.tips 
{
    position:absolute;z-index:1000;
    width:300px;background:url('image/tips_bg.gif') no-repeat 0 bottom;
    overflow:hidden;
    margin:-5px 0 0 -10px;
}
.tips div
{
    background:url('image/tips_top.gif') no-repeat;
    line-height:22px;
    padding:8px 10px 8px 35px;
}

</style>
<div class="zhuce_b_20140701" style="width:1003px; margin-top: 10px;">
    <table cellpadding="0" cellspacing="0" border="0" class="zhuce_b_ta_20140701">
    	<tr>
            <!--左侧-->
            <td valign="top" style="width:650px;">
            	<div class="zhuce_l_20140701">
                    <!--大标题-->
                    <h3 class="zhuce_h3_20140701">合作共赢，信通天下</h3>
                    <!--大标题 end-->
                    <!--进程-->
                    <div class="shunxu_tx_20140701">
                </div>
                <!--进程 end-->
                <!--内容区-->
                <div class="zcneir_20140701">
                    <!--选项卡区域-->
                    <iframe src="" name="send" id="send" style="display:none;"></iframe>
                    <form action="{$CFG[url]}member/register_f.php" method="post" target="send" onsubmit="return check();">
			<input name="action" type="hidden" id="action" value="{crypt_action('register')}"/>
			<input name="forward" type="hidden" value="{$forward}"/>			
			<div class="zcneir_t_20140701">
                            <ul class="zcneir_tul_20140701">
                                
                                <li class="zcneir_tli_20140701">
                    <a class="zcneir_at_20140701" href="{$CFG[url]}member/register.php" onclick="regist(2)" id="regista2">普通注册 <input type="radio" name="post[regid]" value="5" id="g_5" onclick="reg(0);" checked style="display:none"/>
                                    </a>
                                </li>
                                <li class="zcneir_tli_20140701"><!--企业会员 yandk_modi_20160806-->
                                    <a class="zcneir_ats_20140701"  onclick="regist(1)" id="regista1">快捷注册 </a>
                                </li>
                            </ul>
                        </div>                       
                       
                        <div class="reg_title">帐户信息</div>
                 <table cellpadding="5" cellspacing="5" width="100%">
             <tr onmouseover="Ds('tcompany');" onmouseout="Dh('tcompany');">
                                        <td class="tl">公司名称 <span class="f_red">*</span></td>
                                        <td width="300"><input type="text" class="reg_inp" style="width:280px;" name="post[company]" id="company" onblur="validator('company');"/></td>
                                        <td>
                                            <div class="tips" id="tcompany" style="display:none;">
                                                <div>请填写公司全称，与营业执照保持一致，注册之后将不可更改</div>
                                            </div>
                                            <span id="dcompany" class="f_red"></span>&nbsp;
                                        </td>
                                    </tr>
                            <tr onmouseover="Ds('ttruename');" onmouseout="Dh('ttruename');">
                                <td class="tl">联系人 <span class="f_red">*</span></td>
                                <td width="220">
                                    <input type="text" class="reg_inp" style="width:80px;" name="post[truename]" id="truename" onblur="validate('truename');"/>
                                    <input type="radio"  name="post[gender]" value="1" checked id="gender_1" style="display:none"/>
                                   
                                </td>
                                <td>
                                    <div class="tips" id="ttruename" style="display:none;">
                                        <div>请与有效身份证件上的姓名保持一致</div>
                                    </div>
                                    <span id="dtruename" class="f_red"></span>&nbsp;
                                </td>
                            </tr>
                         
                           <tr onmouseover="Ds('tmobile');" onmouseout="Dh('tmobile');">
                                <td class="tl">手机号码<span class="f_red">*</span> {if $could_mobilecode}<span class="f_red">*</span>{else}&nbsp;{/if}</td>
                                <td><input type="text" class="reg_inp" style="width:200px;" name="post[mobile]" id="mobile"onblur="validator('mobile');"/></td>
                                <td>
                                    
                                    <span id="dmobile" class="f_red"></span>&nbsp;	
                                </td>
                            </tr>
                             <tr onmouseover="Ds('temail');" onmouseout="Dh('temail');">
                                <td class="tl">电子邮箱 <span class="f_red">*</span></td>
                                <td><input type="text" class="reg_inp" style="width:200px;" name="post[email]" id="email" onblur="validator('email');"{if $email} value="{$email}" readonly{/if}/></td>
                                <td>
                                    <div class="tips" id="temail" style="display:none;">
                                        <div>
                                            {if $MOD[checkuser] == 2}
                                            <span class="f_red">系统设置了邮件验证注册，请确保当前的邮件地址真实有效<br/></span>
                                            {/if}
                                            请使用常用常用邮箱(Email)地址，地址不会被公开且可用于登录网站			
                                            </div>
                                    </div>
                                    <span id="demail" class="f_red"></span>&nbsp;	
                                </td>
                            </tr>
            </table>
			<table cellpadding="5" cellspacing="5" width="100%">
                           <tr>
                                <td class="tl">&nbsp;</td>
                                <td width="300"><input type="checkbox" checked="checked" onclick="if(this.checked){Ds('sbm');}else{Dh('sbm');}"/> <a href="?read=1" target="_blank" class="b">我已阅读并同意服务条款</a></td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr id="sbm">
                                <td class="tl"></td>
                                <td>
                                    <input type="submit" name="submit" value="" class="tjzcxinx_bu_20140701"/>
                                </td>
                                <td>&nbsp;</td>
                            </tr>
			</table>
                    </form>
                </div>
            </td>
        	<!--左侧 end-->
        	<!--右侧-->
            <!--右侧 end-->
        </tr>
    </table>
</div>
<!---------------------------------------------------------------------------------------------------------------->
<script type="text/javascript" src="{DT_STATIC}file/script/guest.js"></script>
<script type="text/javascript">
if(Dd('username').value == '') Dd('username').focus();
{if $MOD[question_register]}Dd('answer').className = 'reg_inp';{/if}
{if $MOD[captcha_register]}Dd('captcha').className = 'reg_inp';{/if}
var vid = '';
function dtrim(id) {
	var str = Dd(id).value.trim();
	if(Dd(id).value != str) Dd(id).value = str;
}
function validator(id) {
	vid = id;
	dtrim(id);
	makeRequest('moduleid={$moduleid}&action=member&job='+id+'&value='+Dd(id).value, AJPath, '_validator');
}
function _validator() {
	if(xmlHttp.readyState==4 && xmlHttp.status==200) {
		Dd('d'+vid).innerHTML = xmlHttp.responseText ? '<img src="{DT_SKIN}image/check_error.gif" align="absmiddle"/> '+xmlHttp.responseText : '<img src="{DT_SKIN}image/check_right.gif" align="absmiddle"/> ';
	}
}
function err_msg(str, id) {
	Dd('d'+id).innerHTML = '<img src="{DT_SKIN}image/check_'+(str ? 'error' : 'right')+'.gif" align="absmiddle"/> '+str;
}
function validate(type) {
	 if(type == 'truename') {
		dtrim(type);
		if(Dd('truename').value.length < 2) {
			err_msg('请输入真实姓名', type);
		} else {
			err_msg('', type);
		}
	} else if(type == 'telephone') {
		dtrim(type);
		if(Dd('telephone').value.match(/^[0-9\-\(\)\+\.]{7,}$/)) {
			err_msg('', type);
		} else {
			err_msg('请输入公司电话', type);
		}
	}
}
function reg(type) {
	if(type) {
		Ds('company_detail');
	} else {
		Dh('company_detail');
	}
}
function Df(ID) {
	Dd(ID).focus();
}
function check() {
	var f,p;
	f = 'truename';
	if(Dd(f).value == '') {
		err_msg('请填写真实姓名', f);
		Df(f);
		return false;
	}
	f = 'company';
	if(Dd(f).value == '') {
		err_msg('请填写公司名称', f);
		Df(f);
		return false;
	}
	
	f = 'email';
	if(Dd(f).value.length < 6) {
		err_msg('请填写电子邮箱', f);
		Df(f);
		return false;
	}
	if(Dd('d'+f).innerHTML.indexOf('error') != -1) {
		Df(f);
		return false;
	}
	
	if(Dd('g_5').checked == false) {
		f = 'company';
		if(Dd(f).value == '') {
			err_msg('请填写公司名称', f);
			Df(f);
			return false;
		}
		if(Dd('d'+f).innerHTML.indexOf('error') != -1) {
			Df(f);
			return false;
		}
		
	}
        
		//yandk_add_20160807
		f="mobile";
		var reg = /^1[0-9]{10}$/;
        var phoneNum =Dd(f).value;//手机号码
        var flag = reg.test(phoneNum); //true
		if(!flag){
            Dmsg('手机号格式不正确', f);
            return false;
        }
        f="qq";
        if(Dd(f).value.length < 5){
            Dmsg('请重复输入QQ号码', f);
            return false;
        }
    return true;
}

</script>
{template 'footer'}